with Ada.Strings.Maps.Constants;
with Ada.Strings.Fixed;

package body My_String is

   function toString(S : Type_String) return String is
      Chaine : constant String := S.Texte(1..S.Taille);
   begin
      return Chaine;
   end toString;

   function toUpper(S : Type_String) return Type_String is
      begin
         return (Taille => S.Taille, Texte => Ada.Strings.Fixed.Translate(S.Texte(1..S.Taille),Ada.Strings.Maps.Constants.Upper_Case_Map));
   end toUpper;

   function toUpper(S : String) return String is
   begin
      return Ada.Strings.Fixed.Translate(S,Ada.Strings.Maps.Constants.Upper_Case_Map);
   end toUpper;

   function equals(S1,S2 : Type_String) return Boolean is
   begin
      return S1.Texte(1..S1.Taille) = S2.Texte(1..S2.Taille);
   end equals;

end My_String;
